home *** CD-ROM | disk | FTP | other *** search
/ Alde ADA 5 #1 / ADA CD-ROM - Alde Publishing.iso / cm / wist29.wid < prev    next >
Encoding:
Text File  |  1988-05-03  |  7.8 KB  |  145 lines

  1. --= WID = SIMTEL20 Ada Software Repository Item Description File = WID =--
  2. -- WIS TOOL NUMBER   : WIS_TOOL_29
  3. -- LOCATION          : ASR
  4. -- CATEGORY LEVEL 1  : COMPONENTS
  5. -- CATEGORY LEVEL 2  : DYNAMIC STRINGS
  6. -- CATEGORY LEVEL 3  : DYNAMIC STRING 3
  7. -- CATEGORY LEVEL 4  : 
  8. -- INDEX             : String
  9. -- INDEX             : Dynamic String
  10. -- INDEX             : String, Dynamic
  11. -- TAXONOMY          : !Joint Applications!Text Processing, Command Language, Design and Analysis!Dynamic String 3
  12. -- DEPENDENCIES      : 
  13. -- SEE ALSO          : 
  14. --= ABSTRACT             ===============================================--
  15. --  1. TOOL NAME        : Dynamic String Package
  16. --  2. TOOL NUMBER      : 29-1
  17. -- 
  18. --  3. CONTRACTOR       :
  19. --  3a      CONTRACT #   : Not Applicable
  20. --  3b      NAME         : WIS JPMO
  21. --  3c      LOCATION     : Washington D.C.
  22. --                         203306600
  23. --  3d      POC          : Richard G. Cleaveland
  24. --                         (703)285-5071
  25. -- 
  26. --  4. TOOL DESCRIPTION :
  27. --       This is a package of several string manipulation functions based on  
  28. --      a built-in dynamic string type DYN_STRING.  It is an adaptation and    
  29. --      extension of the package proposed by Sylvan Rubin of Ford Aerospace and
  30. --      Communications Corporation in the Nov/Dec 1984 issue of the Journal of
  31. --      Pascal, Ada and Modula-2.  Some new functions have been added, and much
  32. --      of the body code has been rewritten.                                   
  33. -- 
  34. --  5. SCHEDULE         :
  35. --  5a      PDR/CDR      : N/A / First_build 07 DEC 84
  36. --  5b      DELIVERY     : 18 MAR 85
  37. --  5c      DISTRIBUTION : 20 August 1985 GTE, IBM, NOSC, SIMTEL20
  38. --  
  39. --  6. CHARACTERISTICS  :
  40. --  6a      DEVELOPMENT APPROACH : Recode algorithm from Journal of Pascal,
  41. --                                 Ada, and Modula-2
  42. --  6b      HOST MACHINE     : WICAT
  43. --  6c      OPERATING SYSTEM : ROS
  44. --  6d      COMPILER         : Telesoft 1.5 (unvalidated)
  45. --  6e      DEPENDENCIES     :
  46. --         Implementation initially with the Telesoft Ada version 1.3.       
  47. --         This required definition of the DYN_STRING type without use of a  
  48. --         discriminant; an arbitrary maximum string length was chosen.  This 
  49. --         should be changed when an improved compiler is available.        
  50. --  6f      NUMBER OF STATEMENTS : 177
  51. -- 
  52. --  7. DOCUMENTATION    : Source code
  53. --  8. PORTABILITY      : Compiled on VMS with DEC Ada, executed, mods
  54. --                        of discriminants and 8 other modifications.
  55. -- 
  56. --  9. WIS USE          :
  57. --  9a FOUNDATION AREA  : Text Processing, Command Language, Design & Analysis
  58. --  9b WIS USE AREA     : Joint Applications
  59. -- 10. COMMENTS         :
  60. --         type DYN_STRING is private;
  61. --         STRING_TOO_SHORT: exception;
  62. --         function D_STRING(CHAR: character)  return DYN_STRING;
  63. --                 -- Creates a one-byte dynamic string of contents CHAR.
  64. --         function D_STRING(STR : string   )  return DYN_STRING;
  65. --                 -- Creates a dynamic string of contents STR.
  66. --         function D_STRING(N: integer;
  67. --                           B: natural  := 0;
  68. --                           F: character:= ' ') return DYN_STRING;
  69. --         function D_STRING(N: long_integer;
  70. --                           B: natural  := 0;
  71. --                           F: character:= ' ') return DYN_STRING;
  72. --             -- for the two preceding functions,
  73. --             -- B is the number of bytes desired in the returned string. The
  74. --             --      first byte is reserved for the sign; it will be blank
  75. --             --      or '-'.  If B is 0 or unspecified the length of the
  76. --             --      string returned is just enough for the sign and the
  77. --             --      significant digits.  If the number would overflow B,
  78. --             --      the exception STRING_TOO_SHORT is raised.
  79. --             -- F is a leading-fill character. If B is not zero, bytes from 2
  80. --             --      up to the first significant byte will be F.
  81. --         function D_STRING(FLT : float; AFT : integer)  return DYN_STRING;
  82. --                 -- Creates a dynamic string representationof the number FLT
  83. --                 -- in fixed point notation with AFT decimal places.
  84. --         -- The following four functions convert from dynamic strings to the
  85. --         -- desired representation:
  86. --                 function CHAR(DSTR: DYN_STRING) return character;
  87. --                 function STR (DSTR: DYN_STRING) return string;
  88. --                 function INT (DSTR: DYN_STRING) return integer;
  89. --                 function FLT (DSTR: DYN_STRING) return float;
  90. --                 -- (No function LI as yet)
  91. -- 
  92. --         
  93. --         function LENGTH(DSTR: DYN_STRING) return natural;
  94. --         function "<" (DS1, DS2: DYN_STRING) return boolean;
  95. --         function "&" (DS1, DS2: DYN_STRING) return DYN_STRING;
  96. --         function SUBSTRING (DSTR: DYN_STRING;-- Returns a subpart
  97. --                             START  : natural;-- starting at this position
  98. --                             LENGTH : natural)-- and of this length.
  99. --                         return DYN_STRING;
  100. --         function RIGHT (DSTR: DYN_STRING;    -- Returns the part
  101. --                         START  : natural)    -- starting here and to the end
  102. --                         return DYN_STRING;
  103. --         function INDEX (SOURCE_STRING,       --If this string contains
  104. --                         PATTERN_STRING: DYN_STRING; 
  105. --                                           --this string starting at or AFTER
  106. --                         START_POS: integer) --this position, the position of
  107. --                         return integer;      --such start is returned.
  108. --                 -- If the string lengths prohibit the search -1 is returned.
  109. --                 -- If no match was found, 0 is returned.
  110. --                 -- (This is like the INSTR function of BASIC).
  111. --         function RINDEX (SOURCE_STRING,         --If this string contains
  112. --             PATTERN_STRING: DYN_STRING; --this string starting at or BEFORE
  113. --             START_POS: integer)         --this position, the position of
  114. --             return integer;             --such start is returned.
  115. --             -- If the string lengths prohibit the search -1 is returned.
  116. --             -- If no match was found, 0 is returned.
  117. --         function UPPERCASE (DSTR: DYN_STRING) return DYN_STRING;
  118. --                     -- Returns with all lower-case characters changed to
  119. --                     -- uppercase.
  120. -- 11. LAST CHANGE TO DATA : 21 March 1986.
  121. --= FILE LISTING         ===============================================--
  122. -- FILE SPECS        : PD:<ADA.COMPONENTS>DSTR3*.*
  123. -- DIRECTORY DISPLAY :
  124. -- Directory   PD:<ADA.COMPONENTS>
  125. --      File Name     Byte Count  Line Count
  126. --   ---------------  ----------  ----------
  127. --   DSTR3.ABS              6272         128
  128. --   DSTR3.CMM              2068          53
  129. --   DSTR3.PRO              4559          89
  130. --   DSTR3.SRC             16707         487
  131. --   DSTR3.TST              7261         267
  132. --   ===============  ==========  ==========
  133. --     5 Files             36867        1024
  134. --= DISCLAIMER           ===============================================--
  135. --     This software and its documentation are provided "AS IS" and
  136. -- without any expressed or implied warranties whatsoever.  No warranties
  137. -- as to performance, merchantability, or fitness for a particular
  138. -- purpose exist.
  139. --     The user is advised to test the software thoroughly before
  140. -- relying on it.  The user must assume the entire risk and liability of
  141. -- using this software.  In no event shall any person or organization of
  142. -- people be held responsible for any direct, indirect, consequential or
  143. -- inconsequential damages or lost profits.
  144. --======================================================================--
  145.